java program to calculate power of number